using Senparc.Weixin.Exceptions;
using System;
using System.Collections.Generic;
namespace Senparc.Weixin.MP.TenPayLibV3
{
	public class TenPayV3InfoCollection : Dictionary<string, TenPayV3Info>
	{
		public static TenPayV3InfoCollection Data = new TenPayV3InfoCollection();
		public new TenPayV3Info this[string key]
		{
			get
			{
				if (!base.ContainsKey(key))
				{
					throw new WeixinException(string.Format("TenPayV3InfoCollection尚未注册Mch：{0}", key));
				}
				return base[key];
			}
			set
			{
				base[key] = value;
			}
		}
		public static void Register(TenPayV3Info tenPayV3Info)
		{
			TenPayV3InfoCollection.Data[tenPayV3Info.MchId] = tenPayV3Info;
		}
		public TenPayV3InfoCollection() : base(StringComparer.OrdinalIgnoreCase)
		{
		}
	}
}
